package com.hrs.enity.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.hrs.common.constant.VerificationConst;
import com.hrs.common.enums.*;
import com.hrs.util.VerificationUtil;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.io.Serializable;
import java.util.Date;

/**
 * @author 摆渡人
 * @description
 * @date 2022/12/6 13:07
 */
@Data
public class AchieveAddDto implements Serializable {

    @ApiModelProperty(value = "机构id，调用接口获得",required = true)
    @NotNull(message = "请选择机构")
    private Integer departmentId;

    @ApiModelProperty(value = "岗位id，调用接口获得",required = true)
    @NotNull(message = "请选择职位")
    private Integer positionId;

    @ApiModelProperty(value = "姓名",required = true)
//    @NotBlank(message = "请输入姓名")
    private String actualName;

    @ApiModelProperty(value = "性别，0男1女",required = true)
//    @NotNull(message = "请选择性别")
    private Integer sex;

    @ApiModelProperty(value = "邮箱",required = true)
//    @NotBlank(message = "请输入邮箱")
    private String email;

    @ApiModelProperty(value = "电话号",required = true)
    @Pattern(regexp = VerificationConst.FIXED_PHONE_REGEXP,message = "电话格式错误")
//    @NotBlank(message = "请输入电话号")
    private String telephone;

    @ApiModelProperty(value = "qq",required = true)
    @Pattern(regexp = VerificationConst.QQ,message = "QQ格式错误")
//    @NotBlank(message = "请输入qq")
    private String qq;

    @ApiModelProperty(value = "手机号",required = true)
    @Pattern(regexp = VerificationConst.PHONE_REGEXP,message = "手机号格式错误")
//    @NotBlank(message = "请输入手机号")
    private String phone;

    @ApiModelProperty(value = "住址",required = true)
//    @NotBlank(message = "请输入住址")
    private String address;

    @ApiModelProperty(value = "邮编",required = true)
    @Pattern(regexp = VerificationConst.POST_CODE,message = "邮编格式错误")
//    @NotBlank(message = "请输入邮编")
    private String postcode;

    @ApiModelProperty(value = "国籍",notes = "系统枚举，调用接口获取下拉框",required = true)
    @NotNull(message = "请选择国籍")
    private Integer nationality;

    @ApiModelProperty(value = "出生地",required = true)
//    @NotBlank(message = "请输入出生地")
    private String birthplace;

    @ApiModelProperty(value = "生日，如2003-08-02")
//    @NotNull(message = "请输入生日")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date birthday;

    @ApiModelProperty(value = "民族",notes = "系统枚举，调用接口获取下拉框",required = true)
    @NotNull(message = "请选择民族")
    private Integer nation;

    @ApiModelProperty(value = "宗教信仰",notes = "系统枚举，调用接口获取下拉框",required = true)
    @NotNull(message = "请选择宗教信仰")
    private Integer faith;

    @ApiModelProperty(value = "政治面貌",notes = "系统枚举，调用接口获取下拉框",required = true)
    @NotNull(message = "请选择政治面貌")
    private Integer politicsStatus;

    @ApiModelProperty(value = "身份证号码",required = true)
//    @NotBlank(message = "请输入身份证号码")
//    @Pattern(regexp = VerificationConst.ID_CARD)
    private String identity;

    @ApiModelProperty(value = "社会保障号码",required = true)
//    @NotBlank(message = "请输入社会保障号码")
    @Pattern(regexp = VerificationConst.INTEGER)
    private String socialSecurity;

    @ApiModelProperty(value = "学历",notes = "系统枚举，调用接口获取下拉框",required = true)
//    @NotNull(message = "请选择学历")
    private Integer educationBackground;

    @ApiModelProperty(value = "教育年限",notes = "前端写个数字下拉框",required = true)
//    @NotNull(message = "请选择教育年限")
    private Integer educationYear;

    @ApiModelProperty(value = "学历专业",notes = "前端自己列一个下拉框，有个其它可输入，最多15个字",required = true)
//    @NotBlank(message = "请选择学历专业")
    @Length(max = 30,message = "学历专业最长30个字符")
    private String profession;

    @ApiModelProperty(value = "薪酬标准",notes = "调用相关接口获得下拉框",required = true)
    @NotNull(message = "请选择薪酬标准")
    private Long salaryScaleId;

    @ApiModelProperty(value = "开户行",required = true)
//    @NotBlank(message = "请输入开户行")
    @Length(max = 20,message = "开户行最长20个字符")
    private String bank;

    @ApiModelProperty(value = "开户账号",required = true)
//    @NotBlank(message = "请输入开户账号")
    @Pattern(regexp = VerificationUtil.INTEGER,message = "账户只能输入整数")
    private String account;

    @ApiModelProperty(value = "特长",notes = "前端自己列一个下拉框，有个其它可输入，最多15个字",required = true)
//    @NotBlank(message = "请选择特长")
    @Length(max = 15,message = "特长最多15个字符")
    private String specialty;

    @ApiModelProperty(value = "爱好",notes = "前端自己列一个下拉框，有个其它可输入，最多15个字",required = true)
//    @NotBlank(message = "请选择爱好")
    @Length(max = 15,message = "爱好最多15个字符")
    private String hobby;

    @ApiModelProperty(value = "个人履历",required = true)
//    @NotBlank(message = "请输入个人履历")
    private String experience;

    @ApiModelProperty(value = "家庭关系信息",required = true)
//    @NotBlank(message = "请输入家庭关系信息")
    private String familyTies;

    @ApiModelProperty(value = "备注",required = true)
//    @NotBlank(message = "请输入备注")
    private String remark;

}
